<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<table>
<?php
    $news = array();
    require_once "manager/simplehtmldom/simple_html_dom.php";
    // Create DOM from URL or file
    $url = "http://www.youtube.com/results?search_query=kh%C3%A1m+ph%C3%A1&page=2";
    $html = file_get_html($url);
    foreach($html->find('.item-section li .yt-lockup .yt-lockup-content h3.yt-lockup-title a.yt-uix-tile-link') as $title){
        $news[]['title'] = $title->plaintext;
    }
    $count = 0;
    foreach($html->find('.item-section li .yt-lockup .yt-lockup-content h3.yt-lockup-title a.yt-uix-tile-link') as $title){    
        preg_match_all("#(?<=v=|v\/|vi=|vi\/|youtu.be\/)[a-zA-Z0-9_-]{11}#", $title->href, $matches);
        $news[$count]['href'] = $matches[0][0];
        $count ++;
    }
    $count = 0;
    foreach($html->find('div.yt-lockup-thumbnail div.yt-thumb img') as $title){
        $news[$count]['src'] = $title->src;
        $count ++;
    }    
    foreach( $news as $new){
        ?>
            <tr>
                <td><?php echo $new['title']; ?></td>
                <td><?php echo $new['href']; ?></td>
                <td><img src="//i.ytimg.com/vi/<?php echo $new['href']; ?>/mqdefault.jpg" /></td>
            </tr>
        <?php
    }
?>
</table>